<?php
/**
 * Created by PhpStorm.
 * User: alice
 * Date: 2015/12/26
 * Time: 14:14
 */

/**
 * Class Involved_BankManageModel
 */

class Involved_BankManageModel extends BaseModel
{

    protected $table = 'bank_manage';

    /**
     * 获取银行卡列表
     */
    public function BankManageList(){
        return  DB::table($this->table)
            ->selectRaw('ypt_bank_manage.bank_id,ypt_bank_manage.bank_name,ypt_bank_manage.bank_num,ypt_bank_manage.created,ypt_bank_manage.status,ypt_user.user_name as user_id')
            ->leftjoin('user','bank_manage.user_id','=','user.user_id')
            ->get();
    }


    /**
     * 获取银行卡列表
     */
    public function GetBankManageOne($id){
        return  DB::table($this->table)
            ->where('bank_manage.bank_id',$id)
            ->first();
    }
}